package com.xayy.mgt.enums;

import lombok.Getter;

@Getter
public enum RequireInfluenceEnum {
    ANTICIPATORY_FAILURE_INFLUENCE(1, "预想故障影响"),

    HISTORY_FAULT_INFLUENCE(2, "历史故障影响");

    private Integer code;
    private String name;

    RequireInfluenceEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String valueof(Integer index) {
        for (RequireInfluenceEnum requireInfluenceEnum : values()) {
            if (requireInfluenceEnum.getCode() == index) {
                return requireInfluenceEnum.name;
            }
        }
        return "";
    }

}
